const path = require('path')

let p1 = path.join('/path', 'bbb', 'ccc', '..')
let p2 = path.resolve('/path', 'bbb', 'ccc', '..')
console.log(p1);
console.log(p2);

let p11 = path.join('path', 'bbb', 'ccc', '..')
let p21 = path.resolve('path', 'bbb', 'ccc', '..')
console.log(p11);
console.log(p21);